//
//  BgViewController.m
//  IPTV
//
//  Created by Echo on 13-11-19.
//  Copyright (c) 2013年 游强. All rights reserved.
//

#import "BgViewController.h"

@interface BgViewController ()

@end

@implementation BgViewController

#pragma mark - View lifecycle

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    //self.navigationController.navigationBar.tintColor = RGB(8, 19, 90, 1);
    self.view.backgroundColor = [UIColor whiteColor];
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    imageView.image = IMG(@"background.jpg");
    [self.view addSubview:imageView];
    
//    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blcustom_background_3.5.png"]];
    // 不支持 iOS4
    UINavigationBar *navBar = [self.navigationController navigationBar];
    if ([navBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]) {
        if (IOS7_OR_LATER) {
            [navBar setBackgroundImage:IMG(@"navi_bar_iphone5.png") forBarMetrics:0];
        }else{
            [navBar setBackgroundImage:IMG(@"navi_bar.png") forBarMetrics:0];
        }
    }
    [Global SetSubViewExternNone:self];
    
    UIBarButtonItem *leftItem = [UIBarButtonItem backImageBarButtonItem:[UIImage imageNamed:@"back.png"] target:self action:@selector(cancel)];
    self.navigationItem.leftBarButtonItem = leftItem;
    
}
-(void)cancel{
    if (!self.navigationController.presentedViewController) {
        [self.navigationController popViewControllerAnimated:YES];
    }
}

-(void)dealloc {
}


@end
